package pattern.behavioral.command.simple;

/**
 * @author: chaoyang.ren  
 * @date:Jun 9, 2017  
 * @time:11:16:45 AM   
 * @email:chaoyang.ren@foxmail.com  
 * @version: 1.0
 */
public class TelevisionOnCommand implements Command {

	private Television tv;

	public TelevisionOnCommand(Television tv){
		this.tv = tv;
	}
	
	public void execute() {
		tv.tvOn();
	}

	public void cancel() {
		tv.tvOff();
	}

	public Television getTelevision() {
		return tv;
	}

	public void setTelevision(Television tv) {
		this.tv = tv;
	}

}

